package com.e3.basdoc.employeecls.client;

import java.util.List;

import com.e3.basdoc.employeecls.model.EmployeeClsModel;
import com.e3.template.tgf.MyTGFUI;
import com.e3.template.tgf.TGFEditorDialog;
import com.e3.template.tgf.TGFGridPanel;
import com.e3.template.tgf.TGFQueryDialog;
import com.e3.template.tgf.TGFSimpleFormPanel;
import com.e3.template.tgf.TGFTreePanelAsync;
import com.google.gwt.user.client.rpc.AsyncCallback;

public class EmployeeClsUI extends MyTGFUI<EmployeeClsModel> {
	
	private EmployeeClsRPCServiceAsync service = EmployeeClsRPCService.Util.getInstance();

	@Override
	protected TGFSimpleFormPanel<EmployeeClsModel> createFormPanel() {
		return new EmployeeClsFormPanel();
	}

	@Override
	protected TGFGridPanel<EmployeeClsModel> createGridPanel() {
		return new EmployeeClsGridPanel();
	}

	@Override
	protected TGFQueryDialog<EmployeeClsModel> createQueryDialog() {
		return new EmployeeClsQueryDialog();
	}

	@Override
	protected TGFEditorDialog<EmployeeClsModel> createEditorDialog() {
		return new EmployeeClsEditorDialog();
	}

	@Override
	protected void executeDeleteService(final List<EmployeeClsModel> models,AsyncCallback<Void> callback) {
		service.deleteEmployeeClses(models, callback);
	}

	@Override
	protected String getCurrentLocalName() {
		return EmployeeClsMessages.INSTANCE.local_name();
	}

	@Override
	protected EmployeeClsModel createModelInstance() {
		return new EmployeeClsModel();
	}

	@Override
	protected TGFTreePanelAsync<EmployeeClsModel> createTreePanel() {
		return new EmployeeClsTreePanel();
	}
	
	@Override
	protected String getDeletedDetailInfo(List<EmployeeClsModel> models) {
		String msgs = super.getDeletedDetailInfo(models);
		return msgs+";"+EmployeeClsMessages.INSTANCE.msg_delete_confirm_notice();
	}

}
